package com.nameless.controller;

import com.nameless.service.BaseAreaService;
import com.nameless.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author keluoyisi
 * @program: car-parent
 * @description: 地区接口
 * @date 2023-02-27 18:31:50
 */
@RestController
@RequestMapping("/car/baseArea")
public class BaseAreaController {

    @Autowired
    private BaseAreaService baseAreaService;

    @PostMapping("/selectAll")
    public Result selectAll(Integer parentId){
        return baseAreaService.parentId(parentId);
    }

    @GetMapping("/getProvinceCityCounty")
    public Result getProvinceCityCounty(){
        return baseAreaService.getProvinceCityCounty();
    }

}
